<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>NVTX C++ API Reference: nvtx3::v1::message Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">NVTX C++ API Reference<span id="projectnumber">&#160;1.0</span>
   </div>
   <div id="projectbrief">C++ convenience wrappers for NVTX v3 C API</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.5 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><b>nvtx3</b></li><li class="navelem"><b>v1</b></li><li class="navelem"><a class="el" href="classnvtx3_1_1v1_1_1message.html">message</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classnvtx3_1_1v1_1_1message-members.html">List of all members</a>  </div>
  <div class="headertitle"><div class="title">nvtx3::v1::message Class Reference</div></div>
</div><!--header-->
<div class="contents">

<p>Allows associating a message string with an NVTX event via its <code>EventAttribute</code>s.  
 <a href="classnvtx3_1_1v1_1_1message.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a88ef7c3dfcecca925d20bcf6ac43e493"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1message.html#a88ef7c3dfcecca925d20bcf6ac43e493">value_type</a> = nvtxMessageValue_t</td></tr>
<tr class="separator:a88ef7c3dfcecca925d20bcf6ac43e493"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:abdbef47b3202d55a8b956da6b1296448"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1message.html#abdbef47b3202d55a8b956da6b1296448">message</a> (char const *msg) noexcept</td></tr>
<tr class="memdesc:abdbef47b3202d55a8b956da6b1296448"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <code>message</code> whose contents are specified by <code>msg</code>.  <a href="classnvtx3_1_1v1_1_1message.html#abdbef47b3202d55a8b956da6b1296448">More...</a><br /></td></tr>
<tr class="separator:abdbef47b3202d55a8b956da6b1296448"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0864f7bb6f147a8e45241883fc53d2bf"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1message.html#a0864f7bb6f147a8e45241883fc53d2bf">message</a> (std::string const &amp;msg) noexcept</td></tr>
<tr class="memdesc:a0864f7bb6f147a8e45241883fc53d2bf"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <code>message</code> whose contents are specified by <code>msg</code>.  <a href="classnvtx3_1_1v1_1_1message.html#a0864f7bb6f147a8e45241883fc53d2bf">More...</a><br /></td></tr>
<tr class="separator:a0864f7bb6f147a8e45241883fc53d2bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad5fcc11a05dfb819fcf3238ae90131a0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1message.html#ad5fcc11a05dfb819fcf3238ae90131a0">message</a> (std::string &amp;&amp;)=delete</td></tr>
<tr class="memdesc:ad5fcc11a05dfb819fcf3238ae90131a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disallow construction for <code>std::string</code> r-value.  <a href="classnvtx3_1_1v1_1_1message.html#ad5fcc11a05dfb819fcf3238ae90131a0">More...</a><br /></td></tr>
<tr class="separator:ad5fcc11a05dfb819fcf3238ae90131a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15e5e0153c1ccb5db9db7ed35ed61481"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1message.html#a15e5e0153c1ccb5db9db7ed35ed61481">message</a> (wchar_t const *msg) noexcept</td></tr>
<tr class="memdesc:a15e5e0153c1ccb5db9db7ed35ed61481"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <code>message</code> whose contents are specified by <code>msg</code>.  <a href="classnvtx3_1_1v1_1_1message.html#a15e5e0153c1ccb5db9db7ed35ed61481">More...</a><br /></td></tr>
<tr class="separator:a15e5e0153c1ccb5db9db7ed35ed61481"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af152cd392b2bd13dd1fd00fbf2d29c09"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1message.html#af152cd392b2bd13dd1fd00fbf2d29c09">message</a> (std::wstring const &amp;msg) noexcept</td></tr>
<tr class="memdesc:af152cd392b2bd13dd1fd00fbf2d29c09"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <code>message</code> whose contents are specified by <code>msg</code>.  <a href="classnvtx3_1_1v1_1_1message.html#af152cd392b2bd13dd1fd00fbf2d29c09">More...</a><br /></td></tr>
<tr class="separator:af152cd392b2bd13dd1fd00fbf2d29c09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a8b73acb3c9cd2a5d78fe94efb0a9db"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1message.html#a3a8b73acb3c9cd2a5d78fe94efb0a9db">message</a> (std::wstring &amp;&amp;)=delete</td></tr>
<tr class="memdesc:a3a8b73acb3c9cd2a5d78fe94efb0a9db"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disallow construction for <code>std::wstring</code> r-value.  <a href="classnvtx3_1_1v1_1_1message.html#a3a8b73acb3c9cd2a5d78fe94efb0a9db">More...</a><br /></td></tr>
<tr class="separator:a3a8b73acb3c9cd2a5d78fe94efb0a9db"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2827347a64c6c91518f5191eade74054"><td class="memTemplParams" colspan="2">template&lt;typename D &gt; </td></tr>
<tr class="memitem:a2827347a64c6c91518f5191eade74054"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1message.html#a2827347a64c6c91518f5191eade74054">message</a> (<a class="el" href="classnvtx3_1_1v1_1_1registered__string__in.html">registered_string_in</a>&lt; D &gt; const &amp;msg) noexcept</td></tr>
<tr class="memdesc:a2827347a64c6c91518f5191eade74054"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <code>message</code> from a <code><a class="el" href="classnvtx3_1_1v1_1_1registered__string__in.html" title="A message registered with NVTX.">registered_string_in</a></code>.  <a href="classnvtx3_1_1v1_1_1message.html#a2827347a64c6c91518f5191eade74054">More...</a><br /></td></tr>
<tr class="separator:a2827347a64c6c91518f5191eade74054"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad16d6a6518feb8f438faf0dbe052a4ee"><td class="memItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1message.html#ad16d6a6518feb8f438faf0dbe052a4ee">message</a> (nvtxMessageType_t const &amp;type, nvtxMessageValue_t const &amp;value) noexcept</td></tr>
<tr class="memdesc:ad16d6a6518feb8f438faf0dbe052a4ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <code>message</code> from NVTX C API type and value.  <a href="classnvtx3_1_1v1_1_1message.html#ad16d6a6518feb8f438faf0dbe052a4ee">More...</a><br /></td></tr>
<tr class="separator:ad16d6a6518feb8f438faf0dbe052a4ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0e7eae70ce91c6f8aa9be048fc146bd"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1message.html#ab0e7eae70ce91c6f8aa9be048fc146bd">message</a> (nvtxStringHandle_t handle) noexcept</td></tr>
<tr class="memdesc:ab0e7eae70ce91c6f8aa9be048fc146bd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <code>message</code> from NVTX C API registered string handle.  <a href="classnvtx3_1_1v1_1_1message.html#ab0e7eae70ce91c6f8aa9be048fc146bd">More...</a><br /></td></tr>
<tr class="separator:ab0e7eae70ce91c6f8aa9be048fc146bd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17d2eaf8f1c653ddf6237425833f3cfc"><td class="memItemLeft" align="right" valign="top">constexpr value_type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1message.html#a17d2eaf8f1c653ddf6237425833f3cfc">get_value</a> () const noexcept</td></tr>
<tr class="memdesc:a17d2eaf8f1c653ddf6237425833f3cfc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the union holding the value of the message.  <a href="classnvtx3_1_1v1_1_1message.html#a17d2eaf8f1c653ddf6237425833f3cfc">More...</a><br /></td></tr>
<tr class="separator:a17d2eaf8f1c653ddf6237425833f3cfc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a856a7186fd697a92b2a6699a448ffc45"><td class="memItemLeft" align="right" valign="top">constexpr nvtxMessageType_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnvtx3_1_1v1_1_1message.html#a856a7186fd697a92b2a6699a448ffc45">get_type</a> () const noexcept</td></tr>
<tr class="memdesc:a856a7186fd697a92b2a6699a448ffc45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the type information about the value the union holds.  <a href="classnvtx3_1_1v1_1_1message.html#a856a7186fd697a92b2a6699a448ffc45">More...</a><br /></td></tr>
<tr class="separator:a856a7186fd697a92b2a6699a448ffc45"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p >Allows associating a message string with an NVTX event via its <code>EventAttribute</code>s. </p>
<p >Associating a <code>message</code> with an NVTX event through its <code><a class="el" href="classnvtx3_1_1v1_1_1event__attributes.html" title="Describes the attributes of a NVTX event.">event_attributes</a></code> allows for naming events to easily differentiate them from other events.</p>
<p >Every time an NVTX event is created with an associated <code>message</code>, the contents of the message string must be copied. This may cause non-trivial overhead in highly performance sensitive sections of code. Use of a <code>nvtx3::registered_string</code> is recommended in these situations.</p>
<p >Example: </p><div class="fragment"><div class="line"><span class="comment">// Creates an `event_attributes` with message &quot;message 0&quot;</span></div>
<div class="line"><a class="code hl_class" href="classnvtx3_1_1v1_1_1event__attributes.html">nvtx3::event_attributes</a> attr0{<a class="code hl_class" href="classnvtx3_1_1v1_1_1message.html">nvtx3::message</a>{<span class="stringliteral">&quot;message 0&quot;</span>}};</div>
<div class="line"> </div>
<div class="line"><span class="comment">// `range0` contains message &quot;message 0&quot;</span></div>
<div class="line">nvtx3::scoped_range range0{attr0};</div>
<div class="line"> </div>
<div class="line"><span class="comment">// `std::string` and string literals are implicitly assumed to be</span></div>
<div class="line"><span class="comment">// the contents of an `nvtx3::message`</span></div>
<div class="line"><span class="comment">// Creates an `event_attributes` with message &quot;message 1&quot;</span></div>
<div class="line"><a class="code hl_class" href="classnvtx3_1_1v1_1_1event__attributes.html">nvtx3::event_attributes</a> attr1{<span class="stringliteral">&quot;message 1&quot;</span>};</div>
<div class="line"> </div>
<div class="line"><span class="comment">// `range1` contains message &quot;message 1&quot;</span></div>
<div class="line"><a class="code hl_typedef" href="nvtx3_8hpp.html#a8e124f3d438e512b586415f1ac2b9677">nvtx3::scoped_range</a> range1{attr1};</div>
<div class="line"> </div>
<div class="line"><span class="comment">// `range2` contains message &quot;message 2&quot;</span></div>
<div class="line"><a class="code hl_typedef" href="nvtx3_8hpp.html#a8e124f3d438e512b586415f1ac2b9677">nvtx3::scoped_range</a> range2{nvtx3::Mesage{<span class="stringliteral">&quot;message 2&quot;</span>}};</div>
<div class="line"> </div>
<div class="line"><span class="comment">// `std::string` and string literals are implicitly assumed to be</span></div>
<div class="line"><span class="comment">// the contents of an `nvtx3::message`</span></div>
<div class="line"><span class="comment">// `range3` contains message &quot;message 3&quot;</span></div>
<div class="line"><a class="code hl_typedef" href="nvtx3_8hpp.html#a8e124f3d438e512b586415f1ac2b9677">nvtx3::scoped_range</a> range3{<span class="stringliteral">&quot;message 3&quot;</span>};</div>
<div class="ttc" id="aclassnvtx3_1_1v1_1_1event__attributes_html"><div class="ttname"><a href="classnvtx3_1_1v1_1_1event__attributes.html">nvtx3::event_attributes</a></div><div class="ttdoc">Describes the attributes of a NVTX event.</div><div class="ttdef"><b>Definition:</b> <a href="nvtx3_8hpp_source.html#l01913">nvtx3.hpp:1913</a></div></div>
<div class="ttc" id="aclassnvtx3_1_1v1_1_1message_html"><div class="ttname"><a href="classnvtx3_1_1v1_1_1message.html">nvtx3::message</a></div><div class="ttdoc">Allows associating a message string with an NVTX event via its EventAttributes.</div><div class="ttdef"><b>Definition:</b> <a href="nvtx3_8hpp_source.html#l01623">nvtx3.hpp:1623</a></div></div>
<div class="ttc" id="anvtx3_8hpp_html_a8e124f3d438e512b586415f1ac2b9677"><div class="ttname"><a href="nvtx3_8hpp.html#a8e124f3d438e512b586415f1ac2b9677">nvtx3::v1::scoped_range</a></div><div class="ttdeci">scoped_range_in&lt; domain::global &gt; scoped_range</div><div class="ttdoc">Alias for a scoped_range_in in the global NVTX domain.</div><div class="ttdef"><b>Definition:</b> <a href="nvtx3_8hpp_source.html#l02146">nvtx3.hpp:2146</a></div></div>
</div><!-- fragment --> 
<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01623">1623</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a88ef7c3dfcecca925d20bcf6ac43e493" name="a88ef7c3dfcecca925d20bcf6ac43e493"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a88ef7c3dfcecca925d20bcf6ac43e493">&#9670;&#160;</a></span>value_type</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using nvtx3::v1::message::value_type =  nvtxMessageValue_t</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01625">1625</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="abdbef47b3202d55a8b956da6b1296448" name="abdbef47b3202d55a8b956da6b1296448"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abdbef47b3202d55a8b956da6b1296448">&#9670;&#160;</a></span>message() <span class="overload">[1/9]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">nvtx3::v1::message::message </td>
          <td>(</td>
          <td class="paramtype">char const *&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <code>message</code> whose contents are specified by <code>msg</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msg</td><td>The contents of the message </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01632">1632</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<a id="a0864f7bb6f147a8e45241883fc53d2bf" name="a0864f7bb6f147a8e45241883fc53d2bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0864f7bb6f147a8e45241883fc53d2bf">&#9670;&#160;</a></span>message() <span class="overload">[2/9]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">nvtx3::v1::message::message </td>
          <td>(</td>
          <td class="paramtype">std::string const &amp;&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <code>message</code> whose contents are specified by <code>msg</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msg</td><td>The contents of the message </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01642">1642</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<a id="ad5fcc11a05dfb819fcf3238ae90131a0" name="ad5fcc11a05dfb819fcf3238ae90131a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad5fcc11a05dfb819fcf3238ae90131a0">&#9670;&#160;</a></span>message() <span class="overload">[3/9]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">nvtx3::v1::message::message </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Disallow construction for <code>std::string</code> r-value. </p>
<p ><code>message</code> is a non-owning type and therefore cannot take ownership of an r-value. Therefore, constructing from an r-value is disallowed to prevent a dangling pointer. </p>

</div>
</div>
<a id="a15e5e0153c1ccb5db9db7ed35ed61481" name="a15e5e0153c1ccb5db9db7ed35ed61481"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a15e5e0153c1ccb5db9db7ed35ed61481">&#9670;&#160;</a></span>message() <span class="overload">[4/9]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">nvtx3::v1::message::message </td>
          <td>(</td>
          <td class="paramtype">wchar_t const *&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <code>message</code> whose contents are specified by <code>msg</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msg</td><td>The contents of the message </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01659">1659</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<a id="af152cd392b2bd13dd1fd00fbf2d29c09" name="af152cd392b2bd13dd1fd00fbf2d29c09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af152cd392b2bd13dd1fd00fbf2d29c09">&#9670;&#160;</a></span>message() <span class="overload">[5/9]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">nvtx3::v1::message::message </td>
          <td>(</td>
          <td class="paramtype">std::wstring const &amp;&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <code>message</code> whose contents are specified by <code>msg</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msg</td><td>The contents of the message </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01669">1669</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<a id="a3a8b73acb3c9cd2a5d78fe94efb0a9db" name="a3a8b73acb3c9cd2a5d78fe94efb0a9db"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a8b73acb3c9cd2a5d78fe94efb0a9db">&#9670;&#160;</a></span>message() <span class="overload">[6/9]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">nvtx3::v1::message::message </td>
          <td>(</td>
          <td class="paramtype">std::wstring &amp;&amp;&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">delete</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Disallow construction for <code>std::wstring</code> r-value. </p>
<p ><code>message</code> is a non-owning type and therefore cannot take ownership of an r-value. Therefore, constructing from an r-value is disallowed to prevent a dangling pointer. </p>

</div>
</div>
<a id="a2827347a64c6c91518f5191eade74054" name="a2827347a64c6c91518f5191eade74054"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2827347a64c6c91518f5191eade74054">&#9670;&#160;</a></span>message() <span class="overload">[7/9]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename D &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">nvtx3::v1::message::message </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classnvtx3_1_1v1_1_1registered__string__in.html">registered_string_in</a>&lt; D &gt; const &amp;&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <code>message</code> from a <code><a class="el" href="classnvtx3_1_1v1_1_1registered__string__in.html" title="A message registered with NVTX.">registered_string_in</a></code>. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">D</td><td>Type containing <code>name</code> member used to identify the <code>domain</code> to which the <code><a class="el" href="classnvtx3_1_1v1_1_1registered__string__in.html" title="A message registered with NVTX.">registered_string_in</a></code> belongs. Else, <code><a class="el" href="structnvtx3_1_1v1_1_1domain_1_1global.html" title="Tag type for the &quot;global&quot; NVTX domain.">domain::global</a></code> to indicate that the global NVTX domain should be used. </td></tr>
  </table>
  </dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">msg</td><td>The message that has already been registered with NVTX. </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01690">1690</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<a id="ad16d6a6518feb8f438faf0dbe052a4ee" name="ad16d6a6518feb8f438faf0dbe052a4ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad16d6a6518feb8f438faf0dbe052a4ee">&#9670;&#160;</a></span>message() <span class="overload">[8/9]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr nvtx3::v1::message::message </td>
          <td>(</td>
          <td class="paramtype">nvtxMessageType_t const &amp;&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">nvtxMessageValue_t const &amp;&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <code>message</code> from NVTX C API type and value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>nvtxMessageType_t enum value indicating type of the payload </td></tr>
    <tr><td class="paramname">value</td><td>nvtxMessageValue_t union containing message </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01702">1702</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<a id="ab0e7eae70ce91c6f8aa9be048fc146bd" name="ab0e7eae70ce91c6f8aa9be048fc146bd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0e7eae70ce91c6f8aa9be048fc146bd">&#9670;&#160;</a></span>message() <span class="overload">[9/9]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">nvtx3::v1::message::message </td>
          <td>(</td>
          <td class="paramtype">nvtxStringHandle_t&#160;</td>
          <td class="paramname"><em>handle</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Construct a <code>message</code> from NVTX C API registered string handle. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">handle</td><td>nvtxStringHandle_t value of registered string handle </td></tr>
  </table>
  </dd>
</dl>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01714">1714</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a856a7186fd697a92b2a6699a448ffc45" name="a856a7186fd697a92b2a6699a448ffc45"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a856a7186fd697a92b2a6699a448ffc45">&#9670;&#160;</a></span>get_type()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr nvtxMessageType_t nvtx3::v1::message::get_type </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the type information about the value the union holds. </p>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01730">1730</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<a id="a17d2eaf8f1c653ddf6237425833f3cfc" name="a17d2eaf8f1c653ddf6237425833f3cfc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17d2eaf8f1c653ddf6237425833f3cfc">&#9670;&#160;</a></span>get_value()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">constexpr value_type nvtx3::v1::message::get_value </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Return the union holding the value of the message. </p>

<p class="definition">Definition at line <a class="el" href="nvtx3_8hpp_source.html#l01724">1724</a> of file <a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="nvtx3_8hpp_source.html">nvtx3.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
